# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SharePointSourcesSharePointSource do
  @moduledoc """
  An individual SharePointSource.

  ## Attributes

  *   `clientId` (*type:* `String.t`, *default:* `nil`) - The Application ID for the app registered in Microsoft Azure Portal. The application must also be configured with MS Graph permissions "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All.
  *   `clientSecret` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ApiAuthApiKeyConfig.t`, *default:* `nil`) - The application secret for the app registered in Azure.
  *   `driveId` (*type:* `String.t`, *default:* `nil`) - The ID of the drive to download from.
  *   `driveName` (*type:* `String.t`, *default:* `nil`) - The name of the drive to download from.
  *   `fileId` (*type:* `String.t`, *default:* `nil`) - Output only. The SharePoint file id. Output only.
  *   `sharepointFolderId` (*type:* `String.t`, *default:* `nil`) - The ID of the SharePoint folder to download from.
  *   `sharepointFolderPath` (*type:* `String.t`, *default:* `nil`) - The path of the SharePoint folder to download from.
  *   `sharepointSiteName` (*type:* `String.t`, *default:* `nil`) - The name of the SharePoint site to download from. This can be the site name or the site id.
  *   `tenantId` (*type:* `String.t`, *default:* `nil`) - Unique identifier of the Azure Active Directory Instance.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :clientId => String.t() | nil,
          :clientSecret =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ApiAuthApiKeyConfig.t() | nil,
          :driveId => String.t() | nil,
          :driveName => String.t() | nil,
          :fileId => String.t() | nil,
          :sharepointFolderId => String.t() | nil,
          :sharepointFolderPath => String.t() | nil,
          :sharepointSiteName => String.t() | nil,
          :tenantId => String.t() | nil
        }

  field(:clientId)

  field(:clientSecret,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ApiAuthApiKeyConfig
  )

  field(:driveId)
  field(:driveName)
  field(:fileId)
  field(:sharepointFolderId)
  field(:sharepointFolderPath)
  field(:sharepointSiteName)
  field(:tenantId)
end

defimpl Poison.Decoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SharePointSourcesSharePointSource do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SharePointSourcesSharePointSource.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SharePointSourcesSharePointSource do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
